package com.by.modules.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.by.common.api.CommonResult;
import com.by.modules.dto.UmsAdminDto;
import com.by.modules.pojo.UmsAdmin;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 后台用户表 服务类
 * </p>
 *
 * @author yufei
 * @since 2021-11-10
 */
public interface IUmsAdminService extends IService<UmsAdmin> {
    /**
     * 用户注册
     * @param dto
     * @return
     */
    CommonResult register(UmsAdminDto dto);

    /**
     * 登录之后返回token
     * @param username
     * @param password
     * @param code
     * @param request
     * @return
     */
    CommonResult login(String username, String password, String code, HttpServletRequest request);

    /**
     * 跟胡用户名获取用户
     * @param username
     * @return
     */
    UmsAdmin getAdminByUsername(String username);

}
